package learn_effective_java.item_02.pizza;

import learn_effective_java.item_02.pizza.Pizza.Builder;

public class Calzone extends Pizza {
	private final boolean sauceInside;

	public static class Builder extends Pizza.Builder<Builder> {
		private boolean sauceInside = false;

		public Builder sauceInside() {
			sauceInside = true;
			return this;
		}

		@Override
		public Calzone build() {
			return new Calzone(this);
		}

		@Override
		protected Builder self() {
			return this;
		}

	}

	public Calzone(Builder builder) {
		super(builder);
		this.sauceInside = builder.sauceInside;
	}

	@Override
	public String toString() {
		return "Calzone [sauceInside=" + sauceInside + ", toppings=" + toppings + "]";
	}

}
